<?php


namespace modules\sys\component;


class CatalogComponent
{
    public $catalogList = [];

    public function catalogList($lists, $id)
    {
        foreach ($lists as $v) {
            if ($v['pid'] == $id) {
                $this->catalogList[] = $v;
                $this->catalogList($lists, $v['id']);
            }
        }
    }
}